import { UserLayout, BasicLayout } from "@/layouts";
const RouteView = {
  name: "RouteView",
  render: h => h("router-view")
};
export const constantRouterMap = [
  {
    path: "/",
    name: "index",
    component: BasicLayout,
    redirect: "/home/index",
    meta: { title: "首页" },
    children: [
      {
        path: "/home/index",
        name: "home",
        component: () => import("@/views/home/index.vue"),
        meta: { title: "首页",}
      },

      {
        name: "UserList",
        path: "/user/list",
        component: () => import("@/views/user/UserList.vue"),
        meta: { title: "用户列表", icon: "user" }
      },
      {
        name: "RoleUserList",
        path: "/user/roleList",
        component: () => import("@/views/user/RoleUserList.vue"),
        meta: { title: "角色列表", icon: "user" }
      },
      {
        name: "NewsList",
        path: "/news/list",
        component: () => import("@/views/news/NewsList.vue"),
        meta: { title: "新闻列表", icon: "fire" }
      },
      {
        name: "CompanyList",
        path: "/company/list",
        component: () => import("@/views/company/CompanyList.vue"),
        meta: { title: "公司进程", icon: "fire" }
      },
      {
        name: "DogList",
        path: "/dog/list",
        component: () => import("@/views/dog/DogList.vue"),
        meta: { title: "狗类大全", icon: "fire" }
      },
      {
        name: "CatList",
        path: "/cat/list",
        component: () => import("@/views/cat/CatList.vue"),
        meta: { title: "猫类大全", icon: "fire" }
      },
      {
        name: "PostList",
        path: "/post/list",
        component: () => import("@/views/post/PostList.vue"),
        meta: { title: "帖子管理", icon: "fire" }
      },
      {
        name: "ShopList",
        path: "/shop/list",
        component: () => import("@/views/shop/ShopList.vue"),
        meta: { title: "商城管理", icon: "shop" }
      }, {
        name: "ServiceList",
        path: "/service/list",
        component: () => import("@/views/service/ServiceList.vue"),
        meta: { title: "服务管理", icon: "shop" }
      }

    ]
  },

  {
    path: "/user",
    component: UserLayout,
    redirect: "/user/login",
    hidden: true,
    children: [
      {
        path: "login",
        name: "login",
        component: () => import("@/views/user/Login")
      },
      {
        path: "register",
        name: "register",
        component: () => import("@/views/user/Register")
      },
      {
        path: "register-result",
        name: "registerResult",
        component: () => import("@/views/user/RegisterResult")
      }
    ]
  },
  {
    path: "*",
    redirect: "/404",

    hidden: true
  },
  {
    path: "/404",
    component: () => import("@/views/exception/404")
  },
  {
    path: "/403",
    component: () => import("@/views/exception/403")
  }
];
